class Solution(object):
    def checkString(self, s):
        state = 0
        for c in s:
            if c == 'a':
                if state:
                    return False
            else:
                state = 1
        return True